package us.nchu.tomtiger.rowMapper;

import org.springframework.jdbc.core.RowMapper;
import us.nchu.tomtiger.model.UserShow;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by XiongXuan on 2018/1/9.
 */
public class UserShowRowMapper implements RowMapper {
    @Override
    public Object mapRow(ResultSet resultSet, int i) throws SQLException {
        UserShow userShow = new UserShow();
        userShow.setId(resultSet.getInt("id"));
        userShow.setPhoneNumber(resultSet.getString("phone_number"));
        return userShow;
    }
}
